﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Itasa.API;
using System.Xml;
using System.Net;
using System.IO;
using System.Drawing;
using System.Web;

namespace Itasa
{
    /// <summary>
    /// Logica di interazione per ShowTooltip.xaml
    /// </summary>
    public partial class ShowTooltip : UserControl
    {

        internal Show s;

        internal ShowTooltip(Show s)
        {
            this.s = s;
            InitializeComponent();
            Uri uri = new Uri(s.Banner, UriKind.Absolute);

            ImageSource imgSource = new System.Windows.Media.Imaging.BitmapImage(uri);

            Banner.SetValue(System.Windows.Controls.Image.SourceProperty, imgSource);
            Banner.ToolTip = s.Name;
            ShowName.Inlines.Add(new Bold(new Run(s.Name)));
            Plot.Inlines.Add(new Italic(new Run(HttpUtility.HtmlDecode(s.Plot))));
        }

    }
}
